const path = require('path')
//../会抵消前面的路径
const pathStr = path.join('/a','/b/c','../','./d','/e')
console.log(pathStr)

const pathSte2 = path.join(__dirname,'./files/1.txt')
console.log(pathSte2)

//定义文件的存放路径
const fpath = '/a/b/c/index.html'

const fullName = path.basename(fpath)
console.log(fullName) 

const nameWithoutExt = path.basename(fpath,'.html')
console.log(nameWithoutExt) 